﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DTO;
using DAO;

namespace BUS
{
    public class PinBUS
    {
        //Hàm này lấy danh sách mạch sạc phù hợp với cường độ
        public static object lay_danh_sach_pin(string _loaipin)
        {
            return PinDAO.lay_danh_sach_pin(_loaipin);
        }

        public List<SanPham_PinDTO> search_pin(string text)
        {
            return PinDAO.search_pin(text);
        }

        public void Insert_Sanpham_Pin(SanPham_DaTa_Pin pin)
        {
            PinDAO.Insert_SanPham_Pin(pin);
        }

        public void Delete_SanPham_Pin(int id)
        {
            PinDAO.Delete_SanPham_Pin(id);
        }

        public SanPham_DaTa_Pin load_pin_id(int id)
        {
            return PinDAO.load_pin_id(id);
        }

        public void Update_SanPham_Pin(SanPham_DaTa_Pin pin)
        {
            PinDAO.Update_SanPham_Pin(pin);
        }




    }
}
